package model

import (
	"gorm.io/gorm"
)

// User用户表
type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(100)"`
	Password string `gorm:"type:varchar(200)"`
}

// 用户和角色的关联表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

// 角色表
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(100)"`
}

// 角色和权限的关联表
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

// 权限表
type Node struct {
	gorm.Model
	NodeNo string `gorm:"type:varchar(100)"`
}

// 配送员表
type Pei struct {
	gorm.Model
	Pname string `gorm:"type:varchar(100)"` //配送员姓名
	Diqu  string `gorm:"type:varchar(100)"` //配送员地址
	Dian  int    `gorm:"type:int(11)"`      //配送员电话
}

// 配送订单表
type Ding struct {
	gorm.Model
	DingBian string `gorm:"type:varchar(100)"` //配送订单编号
	Kei      string `gorm:"type:varchar(100)"` //客户信息
	Dizhi    string `gorm:"type:varchar(100)"` //配送地址
	Pid      int    `gorm:"type:int(100)"`     //关联ID
}
type DingList struct {
	Id        int
	ListBian  string
	ListKei   string
	ListDizhi string
	ListPname string
}
